home *** CD-ROM | disk | FTP | other *** search
- Path: news.ust.hk!cs_billy
- From: cs_billy@ug.cs.ust.hk (Ng Ka Fai)
- Newsgroups: comp.lang.c++
- Subject: Question on writing DLL
- Date: 19 Mar 1996 14:24:05 GMT
- Organization: The Hong Kong University of Science and Technology
- Message-ID: <4img25$75t@ustsu10.ust.hk>
- NNTP-Posting-Host: csl2su12.cs.ust.hk
- X-Newsreader: TIN [version 1.2 PL2]
-
-
- Hello all,
-
- I am a new learner of DLL and I want to write a testing program on it and
- call the DLL from a macro of MS-word. However, error message display
- "Unable to open the specified library" ! What's wrong with it? I suspect
- that the DLL in Borland C++ (4.5) I written was wrong.
- Could anyone help me? Please.
-
- In macro
- --------
- Declare Function Abc Lib "c:\TEST.DLL" () As Integer
- Sub MAIN
- a = Abc()
- MsgBox Str$(a), "TEST"
- End Sub
-
- In DLL
- ------
- #include <stdio.h>
- #include <windows.h>
-
- int FAR _export Abc()
- {
- int a=8;
- return a;
- }
-
- Please e-mail to cs_billy@uxmail.hkust.hk
- Thank you for your attention.
-